<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      >
      	<f:metadata>
    	   <f:viewParam name="activationId" value="#{authBean.activationId}"/>
	    </f:metadata>
      <head><title>IGNORED</title></head>
       <body>
      <ui:composition template="/templates/masterLayout.xhtml">
         <ui:define name="windowTitle">
            Зарегистрироваться
         </ui:define>
         <ui:define name="content">
         <h:panelGroup rendered="#{!authBean.loggedIn}">
         <h2>Регистрация</h2>
		<h:form>
		<table>
<tr>
    <td><h:outputLabel for="surname" value="Фамилия:" /></td>
    <td><h:inputText id="surname" value="#{authBean.newUser.surname}" required="true" /></td>
</tr>
<tr>
    <td><h:outputLabel for="name" value="Имя" /></td>
    <td><h:inputText id="name" value="#{authBean.newUser.name}" required="true" /></td>
</tr>
<tr>
    <td><h:outputLabel for="patronymic" value="Отчество" /></td>
    <td><h:inputText id="patronymic" value="#{authBean.newUser.patronymic}" required="true" /></td>
</tr>
<tr>
    <td><h:outputLabel for="dob" value="Дата рождения" /></td>
    <td><h:inputText id="dob" value="#{authBean.newUser.dateOfBirth}" required="true" /></td>
</tr>
<tr>
    <td><h:outputLabel for="login" value="Имя пользователя:" /></td>
    <td><h:inputText id="login" value="#{authBean.newUser.login}" required="true" /></td>
</tr>
<tr>
    <td><h:outputLabel for="password" value="Пароль:" /></td>
    <td><h:inputSecret id="password" value="#{authBean.newUser.password}" required="true" /></td>
</tr>
<tr>
    <td><h:outputLabel for="email" value="Адрес электронной почты:" /></td>
    <td><h:inputText id="email" value="#{authBean.newUser.email}" required="true" /></td>
</tr>
</table>
<div>
    <h:commandButton value="Зарегистрироваться" action="#{authBean.doRegister}" />
</div>
<div>
    <h:messages />
</div>
</h:form>
</h:panelGroup>
         </ui:define>
      </ui:composition>
   </body>
 </html>
